package com.yun.zf.common.admin.model.pact;

import com.yun.zf.common.admin.model.order.SubOrderMo;
import com.yun.zf.common.admin.model.order.PerformanceMo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * 创建客户订单提交数据
 */
@Data
public class CustomerOrderMo {
    /**
     * 订单业务类型，1租赁，2买卖
     */
    @NotNull(message = "订单业务类型不能为空")
    @ApiModelProperty(value = "订单业务类型")
    private String type;

    @NotNull(message = "房源id")
    @ApiModelProperty(value = "房源id")
    private Long basicId;

    @NotBlank(message = "房源编号不能为空")
    @ApiModelProperty(value = "房源编号")
    private String houseNumber;

    @ApiModelProperty(value = "小区id")
    private Long communityId;
    // 房源成交价
    @ApiModelProperty(value = "房源成交价")
    private BigDecimal finalPrice;

    @ApiModelProperty(value = "房源地址")
    private String address;

    /**
     * 客户编号
     */
    @NotBlank(message = "客户编号")
    @ApiModelProperty(value = "客户编号")
    private String customerNumber;

    @NotBlank(message = "客户姓名不能为空")
    @ApiModelProperty(value = "客户姓名")
    private String cusName;

    @NotBlank(message = "手机号码不能为空")
    @ApiModelProperty(value = "客户手机号码")
    private String cusPhone;

    @NotBlank(message = "业主姓名不能为空")
    @ApiModelProperty(value = "业主姓名")
    private String ownerName;

    @NotBlank(message = "业主手机号码不能为空")
    @ApiModelProperty(value = "业主手机号码")
    private String ownerPhone;

    @NotBlank(message = "是否合作单不能为空")
    @ApiModelProperty(value = "是否为合作单")
    private String isCooperation;

    @NotNull(message = "订单金额不能为空")
    @ApiModelProperty(value = "订单金额")
    private BigDecimal amount;
    // 订单金额分项信息
    private List<SubOrderMo> detailMos;
    //合作业绩信息
    private List<PerformanceMo> performanceMos;

}
